package com.sailors.common.task.sdk.core.constants;

/**
 * Api constants
 *
 * @description: API地址常量
 * @author: cyj
 * @date 2022 -11-25 14:50:43
 */
public class ApiConstants {

    public static String PREFIX;

    // 创建任务
    private static String CREATE_FILE_TASK = "%s/web/file/task";

    // 任务查询
    private static String GET_FILE_TASK = "%s/web/file/task?id=%s";

    // 刷新进度
    private static String REFRESH_PROCESS = "%s/web/file/task/refresh/process";

    // 任务失败更新
    private static String TASK_FAILED = "%s/web/file/task/failed";


    public static String createFileTask() {
        return String.format(CREATE_FILE_TASK, PREFIX);
    }

    public static String getFileTask(Long id) {
        return String.format(GET_FILE_TASK, PREFIX, id);
    }

    public static String refreshProcess() {
        return String.format(REFRESH_PROCESS, PREFIX);
    }

    public static String taskFailed() {
        return String.format(TASK_FAILED, PREFIX);
    }
}
